package com.testwa.distest.client.device.listener.callback.task;import com.google.protobuf.ByteString;import com.testwa.distest.client.device.driver.IDeviceRemoteControlDriver;import com.testwa.distest.client.device.listener.callback.IRemoteCommandCallBack;import lombok.extern.slf4j.Slf4j;import org.apache.commons.lang3.StringUtils;/** * @Program: distest * @Description: * @Author: wen * @Create: 2018-05-08 16:36 **/@Slf4jpublic class TaskCancelCallback implements IRemoteCommandCallBack<ByteString> {    private IDeviceRemoteControlDriver client;    public TaskCancelCallback(IDeviceRemoteControlDriver client) {        this.client = client;    }    @Override    public void callback(ByteString bytes) {        String result = bytes.toStringUtf8();        if(StringUtils.isNotBlank(result)) {            client.stopTask(result);        }    }}